//
//  BVCategoryTool.h
//  BuyVegetable
//
//  Created by yushanchang on 16/10/12.
//  Copyright © 2016年 com.yinding. All rights reserved.
//

#import "BVBaseTool.h"
#import "BVGoodsList.h"

@interface BVCategoryTool : BVBaseTool

/**
 *  获取一级分类
 */
- (void)fetchParentListSuccess:(void(^)(NSArray *parentList))success failure:(void(^)(NSError *error))failure;

/**
 *  获取二级分类
 */
- (void)fetchChildListByParentID:(NSString *)parentId success:(void(^)(NSArray *childList))success failure:(void(^)(NSError *error))failure;

/**
 *  获取商品列表
 *
 *  @param childId 二级分类id
 *  @param type    类型 0：默认，1：最新，2：销量，3：价格（从低到高），4：价格（从高到低）
 *  @param cityId  城市id
 *  @param success 成功回调
 *  @param failure 失败回调
 */
- (void)fetchGoodsListByChildID:(NSString *)childId type:(NSString*)type cityID:(NSString *)cityId success:(void(^)(BVGoodsList *))success failure:(void(^)(NSError *error))failure;

// 添加购物车
- (void)addGoodsToShoppingCart:(NSString *)goodsId success:(void(^)())success failure:(void(^)(NSError *error))failure;


@end
